    <div class="container top">
		<div class="well">
			<?php 
                $attr = array('class' => 'form-horizontal','role' => 'form');
                echo form_open('network/release',$attr);
            ?>
                <div class="form-group">
                    <label class="col-sm-2 control-label">分 类</label>
                    <div class="col-sm-8">
                        <?php
                        $query = $this->catalogue_model->cat_all();
                        foreach ($query as $value) {
                        ?>
                        <label class="radio-inline">
                            <input type="radio" name="type" checked value="<?php echo $value['cat_another_name'] ?>"> <?php echo $value['cat_name'] ?>
                        </label>
                        <?php } ?>
                    </div>
                 </div>
			  	<div class="form-group">
			    	<label class="col-sm-2 control-label">地 址</label>
			    	<div class="col-sm-8" id="picInput">
			      		<input type="text" class="form-control border" name="pic_url_0" required="true" maxlength="128" autofocus="true">
			    	</div>
					<div class="col-sm-2">
			    		<a class="btn btn-primary border" onClick="javascript:addInput()">添加</a>
			    	</div>
			  	</div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">标 题</label>
                    <div class="col-sm-8">
                        <input type="text" class="form-control border" name="title">
                    </div>
                </div>
                <div class="form-group">
                    <label for="inputPassword3" class="col-sm-2 control-label">描 述</label>
                    <div class="col-sm-8">
                        <textarea class="form-control border" rows="5" name="info"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">标 签</label>
                    <div class="col-sm-8">
                        <input type="text" class="form-control border" name="tag" id="tag" placeholder="使用空格分隔多个标签" data-role="tagsinput">
                    </div>
                </div>   
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-8">
                    <?php
                        $query = $this->tags_model->tags();
                        foreach ($query as $value) {
                    ?>
                        <span class='label label-default border' style="cursor: pointer;" onClick="ClickTag('<? echo $value['tag_name'] ?>')"><? echo $value['tag_name'] ?></span>
                    <?php } ?>
                    </div>
                </div>
			  	<div class="form-group">
			    	<div class="col-sm-offset-2 col-sm-2">
			      		<button class="btn btn-primary border" type="submit">发 布</button>
			    	</div>
			  	</div>
			  	<div class="form-group">
			    	<label class="col-sm-offset-2 col-sm-8"><?php echo validation_errors(); ?></label>
			  	</div>
			</form>
        </div>
	</div>
</div>
<script>
	function addInput () {
		var picInput = $('#picInput');
		var input = $('<input>');
		var conut = picInput.find('input').length;
		input.attr('type', 'text');
		input.attr('name', 'pic_url_' + conut);
		input.addClass("form-control border");
		input.css("margin-top","10px");
		if (conut < 10) {
			picInput.append(input);
		} else {
			window.alert("最多只能添加10个");
		}
	}

    function Clickalbum (argument) 
    {
        $('#album').val(argument);
    }

    function ClickTag (argument)
    {
        $('#tag').tagsinput('add', argument);
    }
    </script>
    <script src="<?php echo base_url('dist/js/bootstrap-tagsinput.min.js') ?>"></script>
    <script>
    $('#tag').tagsinput({
      maxTags   : 6,
      maxChars  : 32,
      trimValue : true
    });
    </script>